import request from '@/utils/request'

// 查询菜品口味关系列表
export function listFlavor(query) {
  return request({
    url: '/eservice/flavor/list',
    method: 'get',
    params: query
  })
}

// 查询菜品口味关系详细
export function getFlavor(dishFlavorId) {
  return request({
    url: '/eservice/flavor/' + dishFlavorId,
    method: 'get'
  })
}

// 新增菜品口味关系
export function addFlavor(data) {
  return request({
    url: '/eservice/flavor',
    method: 'post',
    data: data
  })
}

// 修改菜品口味关系
export function updateFlavor(data) {
  return request({
    url: '/eservice/flavor',
    method: 'put',
    data: data
  })
}

// 删除菜品口味关系
export function delFlavor(dishFlavorId) {
  return request({
    url: '/eservice/flavor/' + dishFlavorId,
    method: 'delete'
  })
}
